package actionStruts;

import java.util.List;

import pojo.TblAdvertAddress;
import pojo.Tbldeftype;
import pojo.advert.TblAdvert;
import servise.DefCodeService;

import com.opensymphony.xwork2.ActionSupport;

public class CodeAction extends ActionSupport {

	private List<Tbldeftype> tbldeftypeList;
	private List<TblAdvertAddress> tblAdvertAddressList;
	private List<TblAdvert> tblAdvertLeftList;
	private List<TblAdvert> tblAdvertRightList;
	
	public void  activeAdvert(){
		try {
			DefCodeService defCodeService = new DefCodeService();
			tblAdvertLeftList = defCodeService.findActiveAdvertLeft();
			tblAdvertRightList = defCodeService.findActiveAdvertRight();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public void findAdvertAddress(){
		try {
			DefCodeService defCodeService = new DefCodeService();
			tblAdvertAddressList = defCodeService.findAdvertAddress();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void findDefCode(){
		try {
			DefCodeService defCodeService = new DefCodeService();
			tbldeftypeList = defCodeService.findDefCode();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public List<Tbldeftype> getTbldeftypeList() {
		return tbldeftypeList;
	}

	public void setTbldeftypeList(List<Tbldeftype> tbldeftypeList) {
		this.tbldeftypeList = tbldeftypeList;
	}

	public List<TblAdvertAddress> getTblAdvertAddressList() {
		return tblAdvertAddressList;
	}

	public void setTblAdvertAddressList(List<TblAdvertAddress> tblAdvertAddressList) {
		this.tblAdvertAddressList = tblAdvertAddressList;
	}
	public List<TblAdvert> getTblAdvertLeftList() {
		return tblAdvertLeftList;
	}
	public void setTblAdvertLeftList(List<TblAdvert> tblAdvertLeftList) {
		this.tblAdvertLeftList = tblAdvertLeftList;
	}
	public List<TblAdvert> getTblAdvertRightList() {
		return tblAdvertRightList;
	}
	public void setTblAdvertRightList(List<TblAdvert> tblAdvertRightList) {
		this.tblAdvertRightList = tblAdvertRightList;
	}


}
